﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using ChessWebService.DTO;
using ChessWebService.Models;

namespace ChessWebService.Controllers
{
    public class FacebookOAuthController : ApiController
    {
        public TaiKhoan Get(string username,string mail)
        {
            TaiKhoanDAO TaiKhoanDAO = new TaiKhoanDAO();            
            return TaiKhoanDAO.KiemTraTaiKhoanFacebookOAuth(username,  mail);
        }

        public void Post([FromBody]TaiKhoan value)
        {
            TaiKhoanDAO TaiKhoanDAO = new TaiKhoanDAO();
            TaiKhoanDAO.ThemTaiKhoanFacebookOAuth(value);
        }
    }
}
